home *** CD-ROM | disk | FTP | other *** search
Makefile | 1999-08-24 | 4.6 KB | 161 lines |
- # To compile ¸ ªr îNT and Win95
- #
- #
- # Changed for use with MinGW32 by HBB
- # Modified for Cygwin beta 20.1 which includes MINGW32
- # Resource compiler is windres.exe in Cygwin b20.1
- # Note png and gif libraries if used have to be build for Cygwin b20.1 with -mno-cygwin option
- #
-
- # where to place gnuplot.gih helpfile
- HELPFILE = wgnuplot.hlp
- TOP = .
- # May need to add include/mingw32 for Cygwin b20, but not for b20.1
- #WIN32INC= /e/Cygnus/cygwin-b20/H-i586-cygwin32/i586-cygwin32/include/mingw32
- WIN32INC=/usr/local/include
- #WIN32LIBS =
- #WIN32FLAGS= -DWINVER=0x0400
- CPU=i586
-
- CC = gcc
- LD = gcc
- WINCFLAGS = -O2 -mno-cygwin $(WIN32FLAGS) -I$(TOP) -I$(WIN32INC) -D_Windows -D__WIN32__ -DWIN32 -DHAVE_STRNICMP -DREADLINE=1 -DNO_GIH -DGP_INLINE=inline -DHAVE_SLEEP -DANSI_C -DHAVE_GETCWD -DNEAR= -DHAVE_LIBPNG -DHAVE_LIBGD -DNO_SETVBUF -DCYGWIN
- WINLDFLAGS = -s -mwindows -mno-cygwin -L/usr/local/lib # -v # -Wl,--verbose
- CFLAGS = -g -O2 -I$(TOP) -DNO_GIH -DHAVE_STRNICMP -DREADLINE -DHAVE_SLEEP -DHAVE_GETCWD -DNEAR= -DWIN32
- LDFLAGS = -g #-v # -Wl,--verbose
-
- RM = rm -f
- CP = cp -p
-
- #You'll need the MS Platform SDK, for now. Enter its path here
- MSSDK = e:/sdk
-
- HCW = $(MSSDK)/bin/hcw
- #RC = $(MSSDK)/bin/rc
-
- RC = windres.exe
- RCFLAGS=--define __WIN32__ --define __WIN95__ --define __GNUWIN32__ --define MSRC --define WIN32
-
- # see other terminal defines in term.h
- TERMFLAGS = -I$(TOP)/term
-
-
- # macros for makefile.all
- O=o
- T=term/
- D=docs/
- L=docs/latex/
- M=demo/
-
-
- default: wgnuplot.exe $(HELPFILE) wgnuplot.mnu $(M)bf_test.exe
-
- # include the 'core makefile template'
- include makefile.all
-
- OBJS = $(COREOBJS) version.$(O)
-
- WINOBJS = winmain.$(O) wgnuplib.$(O) wgraph.$(O) wprinter.$(O) wtext.$(O) wpause.$(O) wmenu.$(O)
-
- WINDOWS = makefile.win makefile.nt README.win win/wcommon.h \
- win/wgnuplib.c win/wgnuplib.def win/wgnuplib.h win/wgnuplib.rc \
- win/wgnuplot.def win/wgnuplot.hpj win/wgnuplot.mnu win/wgraph.c \
- win/winmain.c win/wmenu.c win/wpause.c win/wprinter.c \
- win/wresourc.h win/wtext.c win/wtext.h win/geticon.c \
- docs/doc2rtf.c term/win.trm win/grpicon.ico win/texticon.ico
-
-
- # default rules
- .SUFFIXES: .exe .o .c
- .c.o:
- $(CC) -c $(WINCFLAGS) $*.c
-
- WINLDLIBS = -lkernel32 -lgdi32 -lpng -lz -lgd
-
- wgnuplot.exe: $(OBJS) $(WINOBJS) win/wgnuplot.def wgnuplot_res.o texticon.ico grpicon.ico
- $(LD) $(WINLDFLAGS) -o $@ $(OBJS) $(WINOBJS) wgnuplot_res.o $(WINLDLIBS)
-
- # rules
-
- wgnuplot_res.o : win/wgnuplot.rc win/wgnuplib.rc win/wresourc.h texticon.ico grpicon.ico
- $(RC) -i win/wgnuplot.rc -o wgnuplot_res.o $(RCFLAGS)
-
- show.o: show.c plot.h setshow.h
- $(CC) -c $(WINCFLAGS) -DHELPFILE=\"$(HELPFILE)\" -DGNUPLOT_BINDIR=\"$(bindir)\" -c $<
-
- term.$(O): term.c term.h plot.h setshow.h bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
- $(CC) -c $(WINCFLAGS) $(TERMFLAGS) term.c
-
- version.$(O): version.c
-
- WINDEPS = win/wgnuplib.h win/wcommon.h win/wresourc.h
-
- winmain.$(O): win/winmain.c win/wgnuplib.h win/wtext.h plot.h
- $(CC) -c $(WINCFLAGS) -DHELPFILE=\"$(HELPFILE)\" win/winmain.c
-
- wgnuplib.$(O): win/wgnuplib.c $(WINDEPS)
- $(CC) -c $(WINCFLAGS) win/wgnuplib.c
-
- wmenu.$(O): win/wmenu.c $(WINDEPS)
- $(CC) -c $(WINCFLAGS) win/wmenu.c
-
- wtext.$(O): win/wtext.c $(WINDEPS)
- $(CC) -c $(WINCFLAGS) win/wtext.c
-
- wpause.$(O): win/wpause.c $(WINDEPS)
- $(CC) -c $(WINCFLAGS) win/wpause.c
-
- wprinter.$(O): win/wprinter.c $(WINDEPS)
- $(CC) -c $(WINCFLAGS) win/wprinter.c
-
- wgraph.$(O): win/wgraph.c $(WINDEPS)
- $(CC) -c $(WINCFLAGS) win/wgraph.c
-
- wgnuplot.mnu: win/wgnuplot.mnu
- $(CP) $^ $@
-
- # extract icons from wgnuplot.rc
- texticon.ico: grpicon.ico
-
- grpicon.ico: geticon.exe win/wgnuplot.rc
- geticon win/wgnuplot.rc
-
- geticon.exe: win/geticon.c
- $(LD) $(LDFLAGS) -o $@ win/geticon.c
-
- # convert gnuplot.doc to gnuplot.rtf
- $(HELPFILE): doc2rtf.exe docs/gnuplot.doc win/wgnuplot.hpj
- doc2rtf docs/gnuplot.doc win/gnuplot.rtf
- $(HCW) -c -e win/wgnuplot.hpj
-
- doc2rtf.exe: docs/doc2rtf.c docs/termdoc.c docs/xref.c
- $(LD) $(LDFLAGS) -o $@ $(CFLAGS) -I. -Idocs -Iterm $^
-
- #make binary demo files
- $(M)bf_test.exe : bf_test.c dbinary.$(O) alloc.c
- $(LD) $(LDFLAGS) $(CFLAGS) -I. -o $@ $^
- (cd demo ; ./bf_test.exe )
- # cd ..
-
- # _Windows causes wtext.h to define fread() etc
- dbinary.$(O): binary.c
- $(CC) -c $(CFLAGS) -o $@ $^
-
- #bf_test.$(O): bf_test.c
- # $(CC) -c $(CFLAGS) -o $@ $^
-
- #alloc.$(O): alloc.c
- # $(CC) -c $(CFLAGS) -o $@ $^
-
- # clean up temporary files
- clean:
- $(RM) *.$(O) wgnuplot.map wgnuplot.res win/gnuplot.rtf
- $(RM) doc2rtf.exe win/wgnuplib.res wgnuplib.map wgnuplot.lib
- $(RM) demo/bf_test.exe *.ico geticon.exe
-
- realclean: veryclean
- veryclean: clean
- $(RM) wgnuplot.exe wgnuplot.hlp wgnuplot.mnu wgnuplot.gid
- $(RM) demo/binary[123] demo/fit.log demo/soundfit.par
-
-